Skip to content

fix: close v1.8 post-merge integration gaps#44

Merged
PatrickSys merged 2 commits intomasterfrom
fix/v1.8-post-merge-gaps
Feb 22, 2026
Merged

fix: close v1.8 post-merge integration gaps#44
PatrickSys merged 2 commits intomasterfrom
fix/v1.8-post-merge-gaps

Conversation

@PatrickSys
Copy link
Owner

Summary

Fixes 5 live code gaps left behind after PRs #39 and #40 merged. These are cleanup items that ensure the codebase is consistent after the removal of get_component_usage and the introduction of the edit decision card.

Changes

  1. Delete orphaned source filesrc/tools/get-component-usage.ts was removed from the dispatcher in feat: references confidence, remove get_component_usage, ranked search hints (#08) #39 but the source file remained on disk, creating confusion about whether the tool still exists.

  2. Remove phantom allowlist entry'get_component_usage' was still in INDEX_CONSUMING_TOOL_NAMES even though the dispatcher no longer routes to this tool. This caused the validation test to check for a non-existent tool.

  3. Clean up test args dispatch — The ternary in the index-versioning-migration test still had a branch for get_component_usage. Removed dead code.

  4. Update guidance strings — Both src/core/search-quality.ts guidance strings (zero-results and low-confidence paths) still directed agents to use get_component_usage. Now they point to get_symbol_references, which covers the same use cases.

  5. Add fallback preflight logic — When intelligence.json is absent, the preflight card was silently skipped. Now it returns ready: false with a nextAction message telling users to rebuild the index.

Documentation

  • Added internal-docs/next.md capturing 5 deferred gaps from the v1.8.0 audit (non-blocking items for v1.8.1/v1.9.0)
  • Updated CHANGELOG.md with post-merge fix entry

Testing

  • ✅ Index-versioning-migration test passes (5/5 tests)
  • ✅ Zero references to get_component_usage in src/ and tests/
  • ✅ Full test suite: 231/234 passing (3 pre-existing timeout issues unrelated)

Verification

Run the tests:

pnpm vitest run tests/index-versioning-migration.test.ts
pnpm test

Verify no phantom references:

grep -rn "get_component_usage" src/ tests/

Addresses 5 live code gaps left after PRs #39 and #40 merged:

1. Delete orphaned get-component-usage source file (already removed from
   dispatcher in PR #39, but file remained on disk causing confusion)

2. Remove 'get_component_usage' from INDEX_CONSUMING_TOOL_NAMES allowlist
   in src/index.ts. The dispatcher no longer routes to this tool, so the
   allowlist entry created a phantom entry that would be validated during
   test runs despite not being available.

3. Remove get_component_usage branch from args dispatch ternary in
   index-versioning-migration test. Now that the tool is removed, this
   branch is dead code and should not be validated.

4. Replace guidance strings in search-quality.ts that still directed
   agents to the removed get_component_usage tool. Both instances now
   point to get_symbol_references, which covers the same use case.

5. Add fallback decision card when intelligence.json is absent in
   search-codebase.ts. Previously, preflight would silently skip when
   intelligence was missing, leaving users without guidance. Now
   returns ready=false with actionable nextAction message.

All changes verified:
- Zero references to get_component_usage in src/ and tests/
- Index-versioning-migration test passes (5/5)
- Full test suite: 231/234 passing (3 pre-existing timeouts)
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@PatrickSys PatrickSys requested a review from Copilot February 22, 2026 14:08
@greptile-apps
Copy link

greptile-apps bot commented Feb 22, 2026

Greptile Summary

This PR systematically removes all remaining references to the deleted get_component_usage tool and adds a missing fallback for when intelligence.json is absent during edit-intent searches.

Key changes:

  • Deleted orphaned src/tools/get-component-usage.ts source file (tool was removed from dispatcher in feat: references confidence, remove get_component_usage, ranked search hints (#08) #39 but file remained)
  • Removed get_component_usage from INDEX_CONSUMING_TOOL_NAMES allowlist in src/index.ts
  • Updated guidance strings in src/core/search-quality.ts to reference get_symbol_references instead of the deleted tool
  • Cleaned up dead ternary branch in tests/index-versioning-migration.test.ts
  • Added fallback decision card in src/tools/search-codebase.ts when intelligence.json is missing during edit/refactor/migrate intents (previously silently skipped, now returns ready: false with actionable guidance)

All changes are cleanup items ensuring codebase consistency after recent PRs. Test suite shows 231/234 passing (3 pre-existing timeout issues unrelated to this PR).

Confidence Score: 5/5

  • This PR is safe to merge with no risk - pure cleanup of orphaned references
  • All changes are mechanical cleanups removing dead code and phantom references. The orphaned file deletion, allowlist update, guidance string updates, and test cleanup are all straightforward. The only substantive change is the intelligence.json fallback, which improves user experience by providing actionable error messages instead of silently skipping preflight checks. No logic changes, no new features, no breaking changes.
  • No files require special attention - all changes are cleanup

Important Files Changed

Filename Overview
src/core/search-quality.ts Updated guidance strings to reference get_symbol_references instead of deleted get_component_usage
src/index.ts Removed get_component_usage from INDEX_CONSUMING_TOOL_NAMES allowlist
src/tools/get-component-usage.ts Deleted orphaned source file (tool was removed from dispatcher in PR #39)
src/tools/search-codebase.ts Added fallback logic when intelligence.json is missing during edit-intent searches
tests/index-versioning-migration.test.ts Removed dead ternary branch for get_component_usage from test args dispatch

Last reviewed commit: ba81735

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Closes remaining v1.8 integration gaps after removing get_component_usage and introducing the edit decision card, ensuring allowlists, tests, and guidance strings align with current tooling and adding a clearer preflight fallback when intelligence.json is missing.

Changes:

  • Removed the orphaned get_component_usage tool implementation and eliminated remaining references in allowlists/tests/guidance.
  • Updated search-quality guidance to recommend get_symbol_references instead of the deleted tool.
  • Added a preflight fallback that returns ready: false with a rebuild instruction when intelligence.json is absent for edit-like intents.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/index-versioning-migration.test.ts Removes dead test arg dispatch branch for the deleted tool.
src/tools/search-codebase.ts Adds preflight fallback when pattern intelligence is missing for edit/refactor/migrate intents.
src/tools/get-component-usage.ts Deletes orphaned tool source file no longer routed by the dispatcher.
src/index.ts Removes phantom allowlist entry for the deleted tool.
src/core/search-quality.ts Updates guidance strings to point to get_symbol_references.
internal-docs Advances submodule pointer to include updated internal tracking docs.
CHANGELOG.md Records the post-merge gap fixes and the new preflight fallback behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (intent && preflightIntents.includes(intent)) {
if (!intelligence) {
preflight = {
ready: false,
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new fallback preflight object appears to be a different shape than the normal decisionCard assigned later (preflight = decisionCard). If downstream consumers/UI expect a consistent preflight card schema, this can cause rendering/handling inconsistencies. Consider returning a fallback object that matches the same card/schema (e.g., same top-level fields as decisionCard) while still conveying ready: false and the rebuild guidance.

Suggested change
ready: false,
ready: false,
mode: 'lite',
riskLevel: 'low',
confidence: computeIndexConfidence(),
evidenceLock: null,

Copilot uses AI. Check for mistakes.
Comment on lines +442 to +448
if (intent && preflightIntents.includes(intent)) {
if (!intelligence) {
preflight = {
ready: false,
nextAction: 'Run a full index rebuild to generate pattern intelligence before editing.'
};
} else {
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces new observable behavior when intelligence.json is missing (returning a preflight payload with ready: false and nextAction). Add/extend a test that exercises an edit/refactor/migrate intent with missing intelligence to assert the response includes this fallback, so regressions don't silently bring back the previously-skipped preflight.

Copilot uses AI. Check for mistakes.
@PatrickSys PatrickSys merged commit d28460c into master Feb 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants